/*
 * @Author jiangzhiwei
 * @Date 2023-07-22 16:15:56
 * @LastEditors jiangzhiwei
 * @LastEditTime 2023-07-28 11:33:06
 * @FilePath \test-cron\src\components\yc-cron\components\panes\minute-pane\index.js
 * @Description 分钟面板
 */
import { defineComponent } from 'vue-demi'
import { emitValue } from '../../../utils/componentutil'
import { VALUE_NAME, VALUE_EMIT_NAME } from '../../../utils/constant'
import { h } from '../../../utils/domutil'
import CommonTimePane from '../common-time-pane'

export default defineComponent({
  props: {
    [VALUE_NAME]: {
      type: String,
      default: undefined
    }
  },
  methods: {
    onInput (value) {
      emitValue(this, value)
    }
  },
  render () {
    return h(
      CommonTimePane,
      {
        props: { [VALUE_NAME]: this[VALUE_NAME], category: '分钟' },
        on: { [VALUE_EMIT_NAME]: this.onInput }
      }
    )
  }
})
